/**
 *  rect.h
 *  AwkwardCubed - Physics
 *
 *  Date: 21/08/2013
 *
 *  Language: C++
 *
 *  @author Carl mcCaffrey
 *
 */
#ifndef RECT_H
#define RECT_H

#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <xnamath.h>

#define DegToRad(x){x * (3.14159 / 180);}
#define RadToDeg(x){x * (180 / 3.14159);}

class Rect
{
    public:
        XMFLOAT2 pos;
        XMFLOAT2 size;
        float scale;
        float orientation;
        XMFLOAT2 vertices[4];

        float trig[2];
        float prev_orientation;

        void Set(float x, float y, float width, float height, float scalef, float angle_rad);
        void CalculateVertices(void);
};

#endif // RECT_H